package com.huanletao.bean;

import org.apache.commons.beanutils.ConvertUtils;

import java.math.BigDecimal;

/**
 * <p>
 *
 * </p>
 *
 * @package: com.huanletao.bean
 * @description:
 * @className: Demo2
 * @author: @nncskj admin
 * @date: Created in 2022/5/30
 * @copyright: Copyright (c) 2022/5/30
 * @version: V1.0
 */
public class Demo2 {
    public static void main(String[] args) {
        String str = "10";
        BigDecimal obj = (BigDecimal) ConvertUtils.convert(str, BigDecimal.class);
        System.out.println(obj.getClass());//class java.math.BigDecimal
        Object obj2 = ConvertUtils.convert("100",Integer.class);
        System.out.println(obj2.getClass());//class java.lang.Integer


    }
}
